package com.kindey.httpclientdemo;

import com.kindey.httpclientdemo.demo.HttpURLconnectionSimpleDemo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class HttpclientDemoApplication {
    public static final Logger logger = LoggerFactory.getLogger(HttpclientDemoApplication.class);

    public static void main(String[] args) throws Exception {
        SpringApplication.run(HttpclientDemoApplication.class, args);

        HttpURLconnectionSimpleDemo httpURLconnectionSimpleDemo = new HttpURLconnectionSimpleDemo();

        String url = "http://www.baidu.com";
        String result = "";
//        result = httpURLconnectionSimpleDemo.sendGet(url);
//        logger.info("result:{}",result);

        result = httpURLconnectionSimpleDemo.sendPost(url);
        logger.info("result:{}",result);
    }

}
